﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;


namespace LiveProjectManager.DDD.Domains
{
    public class Config : Base.Domain
    {
        // Primary key of a post.
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        [Required]
        public string Key { get; set; }

        [Required]
        public string Value { get; set; }


        override public Dictionary<string, object> toDict()
        {
            Dictionary<string, object> myDict = new Dictionary<string, object>();
            myDict.Add("Id", Id);
            myDict.Add("Key", Key);
            myDict.Add("Value", Value);
            return myDict;
        }
    }
}